home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Linux
/
Kubuntu 8.10
/
kubuntu-8.10-desktop-i386.iso
/
casper
/
filesystem.squashfs
/
var
/
lib
/
dpkg
/
info
/
ufw.postrm
< prev
next >
Wrap
Text File
|
2008-10-08
|
2KB
|
57 lines
#!/bin/sh -e
RULES_PATH="/etc/ufw"
USER_PATH="/var/lib/ufw"
case "$1" in
remove)
;;
purge)
if [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
fi
update-rc.d ufw remove > /dev/null
for f in before.rules before6.rules after.rules after6.rules
do
if which ucf > /dev/null 2>&1; then
ucf -p $RULES_PATH/$f
fi
rm -f $RULES_PATH/$f
rm -f $RULES_PATH/$f.ucf-old $RULES_PATH/$f.ucf-new $RULES_PATH/$f.ucf-dist
done
rm -f $RULES_PATH/ufw.rules $RULES_PATH/ufw.rules.dpkg-old
rm -f $USER_PATH/user.rules $USER_PATH/user6.rules
rm -f /etc/ufw/ufw.conf
# go back to default accept
for exe in iptables ip6tables
do
if which $exe > /dev/null 2>&1; then
$exe -F 2>/dev/null || true
$exe -X 2>/dev/null || true
$exe -P INPUT ACCEPT 2>/dev/null || true
$exe -P OUTPUT ACCEPT 2>/dev/null || true
$exe -P FORWARD ACCEPT 2>/dev/null || true
fi
done
;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument '$1'" >&2
exit 1
;;
esac
# Automatically added by dh_installdebconf
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
fi
# End automatically added section